/** Definition of the Word Data class.
 * @file 
 * @author Jeremy Schultz
 */

#ifndef	__WORDDATA_H_
#define	__WORDDATA_H_

#include <string>
#include <sstream>

using namespace std;

/** Describes a Word data for the PL lanaguage.
 * Base class for Word data. 
 * Number, Bool and ID extend this class store specific Word data types.
 */
class WordData	{
	public:
		/** The valid Word Data types.
		 * This is all the valid Word data types accepted by the PL language.
		 * The base class Word Data stores the Data Type
		 */
		enum DataType	{
			// Types 
			ERROR,				/**< Error  */
			EMPTY,				/**< Empty token */
			NUMBER,
			BOOL,
			ID,
			PROCEDURE
		};

		/** Constuctor.
		 * @param _type Token type
		 */
		WordData(DataType _type);

		/** Getter - type.
		 * @return Data type
		 */
		DataType Type();
	
		/** Getter - Constant.
		 * @return True if word is a constant else false.
		 */
		bool Constant();

		/** Setter - Constant.
		 * @param _const	Set if word is a constant or not
		 */
		void setConstant(bool _const);


		/** A String representation of Word Data.
		 * @return A string
		 * The string format will be: <br>
		 *  type: <i>int</i> const: <i>bool</i>
		 */
		string toString();

	private:
		DataType type;		/**< Data type */
		bool constant;		/**< Stores if it is Constant or not */

};
#endif


